package com.ls.fw.hadoop.client.bean;

import java.io.Serializable;


/**
 * hadoop 中文件信息类
 * <p></p>
 * @author ls 2013-8-30 下午04:47:35
 * @version V1.0   
 * @modificationHistory=========================逻辑或功能性重大变更记录
 * @modify by user: {修改人} 2013-8-30
 * @modify by reason:{方法名}:{原因}
 */
public class HadoopFile  implements  Serializable{
	 /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String name = "";//文件名称
	 private String path = "";//文件路径
	 private boolean isDir = false;//是否为目录
	 
	 /**
	  * 
	  * 创建一个新的实例HadoopFile.
	  * @param name 文件名称
	  * @param path 文件路径
	  */
	public HadoopFile(String hdfsurl,String name, String path) {
		super();
		this.name = name;
		this.path = path.replace(hdfsurl, "");
	}
	/**
	 * 
	 * 创建一个新的实例HadoopFile.
	 * @param name 文件名称
	 * @param path 文件路径
	 * @param isDir 是否为目录
	 */
	public HadoopFile(String hdfsurl,String name, String path, boolean isDir) {
		super();
		this.name = name;
		this.path = path.replace(hdfsurl, "");
		this.isDir = isDir;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getPath() {
		return path;
	}
	public void setPath(String path) {
		this.path = path;
	}
	public boolean isDir() {
		return isDir;
	}
	public void setDir(boolean isDir) {
		this.isDir = isDir;
	}
	@Override
	public String toString() {
		return "HadoopFile [isDir=" + isDir + ", name=" + name + ", path="
				+ path + "]";
	}
	 
	 
}
